home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-18 | 9.1 KB | 389 lines | [TEXT/MPS ] |
- Hello2
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- Mondrian
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
- 3) In the routine MainLoop(), change:
- GetDateTime( (unsigned long *)(&randSeed) );
- to
- GetDateTime( (unsigned long *)(&qd.randSeed) );
-
-
- ShowPICT
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- FlyingLine
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( NULL );
- to
- InitDialogs( 0L );
-
- 3) In the routine WindowInit(), get rid of the unused local variable totalRect.
-
- 4) In the routine WindowInit(), change:
- gOldMBarHeight = MBarHeight;
- MBarHeight = 0;
- to
- gOldMBarHeight = LMGetMBarHeight();
- LMSetMBarHeight( 0 );
-
- 5) In the routine WindowInit(), change:
- window = NewWindow( nil, &(screenBits.bounds),
- kEmptyTitle, kVisible, plainDBox, kMoveToFront,
- kNoGoAway, kNilRefCon );
- to
- window = NewWindow( nil, &(qd.screenBits.bounds),
- kEmptyTitle, kVisible, plainDBox, kMoveToFront,
- kNoGoAway, kNilRefCon );
-
- 6) In the routine WindowInit(), change:
- SetRect( &mBarRect, screenBits.bounds.left,
- screenBits.bounds.top,
- screenBits.bounds.right,
- screenBits.bounds.top+gOldMBarHeight );
- to
- SetRect( &mBarRect, qd.screenBits.bounds.left,
- qd.screenBits.bounds.top,
- qd.screenBits.bounds.right,
- qd.screenBits.bounds.top+gOldMBarHeight );
-
- 7) In the routine WindowInit(), change:
- FillRect( &(window->portRect), black );
- to
- FillRect( &(window->portRect), &qd.black );
-
- 8) In the routine LinesInit(), change:
- GetDateTime( (unsigned long *)(&randSeed) );
- to
- GetDateTime( (unsigned long *)(&qd.randSeed) );
-
- 9) In the routine MainLoop(), change:
- MBarHeight = gOldMBarHeight;
- to
- LMSetMBarHeight( gOldMBarHeight );
-
-
- EventTracker
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
- 3) Change the #include:
- #include <Values.h>
- to
- #include <limits.h>
-
- 4) Change the #define:
- #define kSleep MAXLONG
- to
- #define kSleep LONG_MAX
-
- 5) Near the top of the file, just after the declaration of gDone, add the global declaration:
- AEEventHandlerUPP gDoOpenAppUPP,
- gDoOpenDocUPP,
- gDoPrintDocUPP,
- gDoQuitAppUPP;
-
- 6) In the routine WindowInit(), delete the unused local variable windRect.
-
- 7) In the routine EventInit(), change:
- err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
- DoOpenApp, 0L, false );
- to
- gDoOpenAppUPP = NewAEEventHandlerProc( DoOpenApp );
- err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
- gDoOpenAppUPP, 0L, false );
-
- 8) In the routine EventInit(), change:
- err = AEInstallEventHandler( kCoreEventClass, kAEOpenDocuments,
- DoOpenDoc, 0L, false );
- to
- gDoOpenDocUPP = NewAEEventHandlerProc( DoOpenDoc );
- err = AEInstallEventHandler( kCoreEventClass, kAEOpenDocuments,
- gDoOpenDocUPP, 0L, false );
-
- 9) In the routine EventInit(), change:
- err = AEInstallEventHandler( kCoreEventClass, kAEPrintDocuments,
- DoPrintDoc, 0L, false );
- to
- gDoPrintDocUPP = NewAEEventHandlerProc( DoPrintDoc );
- err = AEInstallEventHandler( kCoreEventClass, kAEPrintDocuments,
- gDoPrintDocUPP, 0L, false );
-
- 10) In the routine EventInit(), change:
- err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication,
- DoQuitApp, 0L, false );
- to
- gDoQuitAppUPP = NewAEEventHandlerProc( DoQuitApp );
- err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication,
- gDoQuitAppUPP, 0L, false );
-
- 11) In the routine HandleMouseDown(), change:
- DragWindow( window, eventPtr->where, &screenBits.bounds );
- to
- DragWindow( window, eventPtr->where, &qd.screenBits.bounds );
-
-
- Updater
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
- 3) Change the #include:
- #include <Values.h>
- to
- #include <limits.h>
-
- 4) Change the #define:
- #define kSleep MAXLONG
- to
- #define kSleep LONG_MAX
-
- 5) In the routine HandleMouseDown(), change:
- growRect.bottom = MAXSHORT;
- growRect.right = MAXSHORT;
- to
- growRect.bottom = INT_MAX;
- growRect.right = INT_MAX;
-
- 6) In the routine HandleMouseDown(), change:
- DragWindow( window, eventPtr->where, &screenBits.bounds );
- to
- DragWindow( window, eventPtr->where, &qd.screenBits.bounds );
-
-
- EventTrigger
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- WorldClock
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
- 3) In the routine HandleMouseDown(), delete the unused local variable oldPort.
-
- 4) In the routine HandleMouseDown(), change:
- DragWindow( window, eventPtr->where, &screenBits.bounds );
- to
- DragWindow( window, eventPtr->where, &qd.screenBits.bounds );
-
-
- Reminder
- 1) Delete this struct definition (it’s built-in now):
- struct PopupPrivateData
- {
- MenuHandle mHandle;
- short mID;
- char mPrivate[1];
- };
-
- 2) Delete these function prototypes (they’re built-in now):
- pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, short newItem)
- = { 0x303C, 0x0304, 0xAA68 };
- pascal OSErr SetDialogCancelItem(DialogPtr theDialog, short newItem)
- = { 0x303C, 0x0305, 0xAA68 };
- pascal OSErr SetDialogTracksCursor(DialogPtr theDialog, Boolean tracks)
- = { 0x303C, 0x0306, 0xAA68 };
-
- 3) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 4) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
- 5) Add this line to the global definitions at the top of the source code:
- NMUPP gLaunchResponseUPP, gNormalResponseUPP;
-
- 6) In main(), add this code just before the call to EventLoop():
- gLaunchResponseUPP = NewNMProc( LaunchResponse );
- gNormalResponseUPP = NewNMProc( NormalResponse );
-
- 7) In the routine CopyDialogToReminder(), chenge:
- if( reminder->launch = GetCtlValue( (ControlHandle)itemHandle ) )
- reminder->notify.nmResp = (NMProcPtr)&LaunchResponse;
- else
- reminder->notify.nmResp = (NMProcPtr)&NormalResponse;
- to
- if( reminder->launch = GetCtlValue( (ControlHandle)itemHandle ) )
- reminder->notify.nmResp = gLaunchResponseUPP;
- else
- reminder->notify.nmResp = gNormalResponseUPP;
-
-
- ResWriter
- 1) Delete these function prototypes (they’re built-in now):
- pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, short newItem)
- = { 0x303C, 0x0304, 0xAA68 };
- pascal OSErr SetDialogCancelItem(DialogPtr theDialog, short newItem)
- = { 0x303C, 0x0305, 0xAA68 };
- pascal OSErr SetDialogTracksCursor(DialogPtr theDialog, Boolean tracks)
- = { 0x303C, 0x0306, 0xAA68 };
-
- 2) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 3) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- Pager
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
- 3) Change the #include:
- #include <Values.h>
- to
- #include <limits.h>
-
- 4) Change the #define:
- #define kSleep MAXLONG
- to
- #define kSleep LONG_MAX
-
- 5) Near the top of the file, just after the declaration of gDone, add the definition:
- ControlActionUPP gActionUPP;
-
- 6) In the routine HandleMouseDown(), change:
- else
- thePart = TrackControl( theControl, thePoint, &ScrollProc );
- to
- else
- {
- gActionUPP = NewControlActionProc( ScrollProc );
- thePart = TrackControl( theControl, thePoint, gActionUPP );
- }
-
- 7) In the routine HandleMouseDown(), change:
- DragWindow( window, eventPtr->where, &screenBits.bounds );
- to
- DragWindow( window, eventPtr->where, &qd.screenBits.bounds );
-
-
- ShowClip
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- SoundMaker
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- OpenPICT
- 1) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 2) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
- PrintPICT
- 1) Change the #include:
- #include <PrintTraps.h>
- to
- #include <Printing.h>
-
- 2) In the routine ToolBoxInit(), change:
- InitGraf( &thePort );
- to
- InitGraf( &qd.thePort );
-
- 3) In the routine ToolBoxInit(), change:
- InitDialogs( nil );
- to
- InitDialogs( 0L );
-
-
-